home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 7
/
007.d81
/
para tester
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
4KB
|
164 lines
1 rem parapsychology tester
3 rem modified by ra briggs lake wales, fl
4 rem c64 translation by dan tobias
8 poke53280,6:poke53281,7:print""
10 gosub1500
20 gosub1200
25 sp$=" "
30 gosub277
40 deffnh(x)=1+d+4*(x-1)
100 print:print
110 v=4:h=1:gosub275:input"[200]ow many trials (5-33)";tr
120 iftr<5ortr>33then110
130 v=5:h=1:gosub275:input"[200]ow many choices (2-10)";nc
140 ifnc<2ornc>10then130
150 d=20-2*nc
170 f1=1:f2=1:f3=1
200 gosub277:gosub450
210 rn=int(rnd(0)*nc)+1
220 gosub590
230 ifrn<>nthen250
240 nh=nh+1
250 nt=nt+1:gosub670
260 ifnt=trthen870
270 goto200
275 printleft$("",v)spc(h-1):return
277 print"[147] ":return
280 rem parameter input
290 printm$
300 geta$:ifa$=""then300
305 ifa$<>"[217]"anda$<>"y"anda$<>"[206]"anda$<>"n"then300
310 printa$:return
320 rem topline
330 ifnt=0thenpc=0:goto350
340 pc=int((nh/nt)*100)
350 print"[212]rials:"nt;
370 printtab(14)"[200]its:"nh;
380 printtab(24)"% [210]ight:";pc;" "
400 return
410 rem noise feedback
440 return
450 rem print "hand"
470 forx=1tonc
480 fordl=1to30*(11-nc):next
490 fory=1to3:v=10+y
500 h=fnh(x):gosub275
510 print" "
520 next
530 v=12:h=fnh(x):gosub275
540 ifx=10thenprint""0;:goto560
550 print""x;
560 next
573 h=1:v=18:gosub275
575 ifrs$="k"orrs$="[203]"then578
576 print"[202]oystick moves pointer left & right":print:print"[194]utton makes select
578 [153]"atnrrow keys move left & right":[153]:[153]"(NULL)val(NULL)(NULL)(NULL)(NULL)wait key makes selection"
580 [142]
590 [141]1300
660 [142]
670 [143] feedback routine
680 [139]f1[167][141]410
690 [139]f2[167][141]320
700 [139]f3[178]0[167][142]
710 [129]x[178]1[164]6
720 [139]rn[178]n[167]v[178]5:h[178]16:[141]275:[153]"(NULL)ight!!!"
730 [129]dl[178]1[164]75:[130]dl
750 [153]"wait";:[139]x[173]2[178][181](x[173]2)[167][153]"";
760 [129]y[178]1[164]3
770 v[178]10[170]y:h[178][165]h(rn):[141]275
780 [153]" ";
790 [130]
800 v[178]12:h[178][165]h(rn):[141]275
810 [139]rn[178]10[167][153]" 0";:[137]830
820 [153]rn;
830 v[178]5:h[178]1:[141]275:[153]"wait "
835 [129]dl[178]1[164]75:[130]dl
840 [130]
860 [142]
870 [143] do end of run statistics
880 [141]320
890 pb[178]0
895 [139]nh[178]0[167]940
900 [129]x[178]0[164]nh[171]1
910 [141]1060
920 pb[178]pb[170]pr
930 [130]
940 pb[178]1[171]pb
950 [141]277
960 v[178]5:h[178]8:[141]275:[153]"(NULL)rials:";nt
970 v[178]7:h[178]7:[141]275:[153]"lenhoices:";nc
980 v[178]9:h[178]10:[141]275:[153]"left$its:";nh
990 [153]"...................."
1000 [153]"(NULL)robability="pb
1010 [153]
1020 [139]pb[177].05[137]1030
1022 [153]"(NULL)his is statistically significant."
1025 [153]:[153]"(NULL)ou would do that well or better by"
1026 [153]:[153]"chance alone only"[181](pb[172]100)"percent of the time."
1027 [137]1050
1030 [153]"(NULL)his is not statistically significant."
1035 [153]:[153]"(NULL)ou would do at least that well by"
1040 [153]:[153]"chance alone"[181](pb[172]100)"percent of the time."
1050 v[178]23:h[178]12:[141]275:[153]"atngain ((NULL) or (NULL))"
1053 [161]ag$:[139]ag$[178]""[167]1053
1055 [139]ag$[178]"(NULL)"[176]ag$[178]"y"[167][156]:[137]20
1056 [139]ag$[179][177]"(NULL)"[175]ag$[179][177]"n"[167]1053
1058 [137]63000:[143] hook to menu here
1060 [143] calc. probability
1070 p[178]1[173]nc:q[178]1[171]p
1080 n[178]nt:[141]1130:n1[178]nf
1090 n[178]x:[141]1130:n2[178]nf
1100 n[178]nt[171]x:[141]1130:n3[178]nf
1110 pr[178](n1[172]p[174]x[172]q[174](nt[171]x))[173](n2[172]n3)
1120 [142]
1130 [143] factorial
1140 nf[178]1
1150 [129]ct[178]1[164]n
1160 nf[178]nf[172]ct
1170 [130]
1180 [142]
1200 [153]"load"
1212 [153]:[153][163]10)"(NULL)=(NULL)eyboard":[153][163]10)"mid$=mid$oystick"
1220 [153]:[153]"(NULL)hich"
1230 [161]rs$:[139]rs$[178]""[167]1230
1240 [153]rs$
1280 [153]"load";:[142]
1300 [143] keyboard input routine
1310 v[178]15:n[178][181](nc[173]2)[170]1
1320 h[178]1:[141]275:[153]sp$;:h[178]1[170][165]h(n):[141]275:[153]"^";
1325 [139]rs$[179][177]"k"[175]rs$[179][177]"(NULL)"[167][141]1400:[137]1340
1330 [161]a$:[139]a$[178]""[167]1330
1340 [139]a$[178][199](13)[167][142]
1350 [139]a$[178]"cmd"[176]a$[178]""[167]n[178]n[171]1:[137]1380
1360 [139]a$[178]""[176]a$[178]"on"[167]n[178]n[170]1:[137]1380
1370 [137]1325
1380 [139]n[179]1[167]n[178]nc
1390 [139]n[177]nc[167]n[178]1
1395 [137]1320
1400 [143] joystick
1401 [129]a[178]1[164]20:[130]:[143] delay
1402 a$[178]""
1403 jv[178][194](56321):[143] get joystick value
1404 fr[178]jv[175]16:jv[178]15[171](jv[175]15)
1405 [139]fr[179][177]16[167]a$[178][199](13):[142]
1410 [139]jv[178]4[176]jv[178]5[176]jv[178]6[167]a$[178]"cmd":[142]
1420 [139]jv[178]8[176]jv[178]9[176]jv[178]10[167]a$[178]"":[142]
1430 [142]
1500 [153]"load"[163]8)"(NULL)arapsychology (NULL)ester"
1510 [153]:[153]" (NULL)his program was written by str$avid"
1520 [153]:[153]"str$urkee and was sent to (NULL)oftdisk by"
1530 [153]:[153]"(NULL).atn. peekriggs. right$t was translated to the"
1535 [153]:[153]"lenommodore 64 by str$aniel (NULL)obias. right$t first"
1540 [153]"appeared on page 223 of the mid$une 1983"
1545 [153]:[153]"issue of (NULL)oftalk magazine."
1550 [153]:[153]" (NULL)he object of the program is to try"
1560 [153]:[153]"to outguess the len-64 (NULL)andom (NULL)umber"
1570 [153]:[153]"chr$enerator. right$f you guess right often"
1580 [153]:[153]"enough then maybe you have val(NULL)(NULL)."
1599 v[178]24:h[178]13:[141]275:[153]"left$it space barwait";
1600 [161]r$:[139]r$[178]""[167]1600
1610 [153]r$:[142]
63000 [143] connect back to l.s.
63002 [153]"loadload"[199](34)"payload"[199](34)",8":[153]"run"
63004 [151]198,0:[151]631,13:[151]632,13:[151]198,2:[128]